<?php

use yii\helpers\Url;
use app\components\Api;
use yii\helpers\Html;

?>

<a href="<?= Url::to(['index']) ?>">返回</a>

<?php if ($re) { ?>
    <pre>
        <?php print_r($re); ?>
    </pre>
<?php } else { ?>
    <pre>
        <?php print_r(Api::toJSON($data)); ?>
    </pre>

    <?= Html::beginForm(); ?>
    <?= Html::submitButton('创建'); ?>
    <?= Html::endForm(); ?>
<?php } ?>

